package com.youease.chris.action
{
	import com.youease.chris.event.TweenEvent;
	import com.youease.chris.util.Tween;

	public class TweenAction extends TargetAction
	{
		/**
		 * 持续时间
		 */
		private var duration:Number;
		/**
		 * 参数
		 */
		private var params:Object;
		
		private var tween:Tween;
		
		public function TweenAction(target:*=null,duration:Number=.1,params:Object=null)
		{
			super();
			this.target = target;
			this.duration = duration;
			this.params = params;
		}
		
		override public function execute():void {
			super.execute();
			
			tween = new Tween(this.target,this.duration,this.params);
			tween.addEventListener(TweenEvent.TWEEN_END,complete);
		}
	}
}